<template>
  <div>
    <div class="topindex">
      <div class="logo">
        <span class="iconfont iconnew"></span>
      </div>
      <div class="search" @click="jumpSearch">
        <span class="iconfont iconsearch"></span>
        搜索新闻
      </div>
      <div class="user" @click="jumpLogin">
        <span class="iconfont iconwode"></span>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  methods: {
    jumpSearch() {
      this.$router.push({
        path: "/searchpage"
      });
    },
    jumpLogin() {
      this.$router.push({
        path: "/login"
      });
    }
  }
};
</script>

<style lang="less" scoped>
.topindex {
  display: flex;
  align-items: center;
  height: 50px;
  background-color: #ff0000;
  padding: 8px 14px;
  box-sizing: border-box;
  .logo {
    .iconnew {
      font-size: 54px;
      color: #fff;
    }
  }
  .search {
    text-align: center;
    flex: 1;
    margin: 0 28px 0 14px;
    background: rgba(242, 242, 242, 0.4);
    border-radius: 13.889vw;
    height: 9.444vw;
    line-height: 9.444vw;
    color: #fff;
    font-size: 18px;
  }
  .user {
    .iconwode {
      font-size: 32px;
      color: #fff;
      opacity: 0.6;
    }
  }
}
</style>
